<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<script type="text/javascript">
/* var isCommited=false;
function dosubmit(){
	if(isCommited==false){
		isCommited=true;
	return true;	
	}else{
		alert("已提交");
		return false;
	}
	
} */
function dosubmit(){
	  var submit=document.getElementById("submit");
	  submit.disabled="disabled";
	  return true;
}

</script>
</head>
<body>
<form action="/day7/FormServlet" method="post" onsubmit="return dosubmit()">
用户名：<input type="text" name="username">

<input type="submit" value="提交" id="submit">
</form>
</body>
</html>